<template>
    <view class="container">
        <canvas type="webgl" id="canvas" canvas-id="canvasId"></canvas>
    </view>
</template>

<script>

export default {
    data() {
        return {
            title: 'Hello'
        }
    },
    onLoad() {
    },
    mounted() {
        uni.createSelectorQuery().select('#canvas').node().exec((res) => {
            // 获取 canvasId
            console.log(res[0])
        });

    },
    methods: {

    },
    components: {
    }
}
</script>

<style scoped >
.container {
    width: 100%;
    height: 100vh;
}
</style>